#ifndef HAL_GPIO_H
#define HAL_GPIO_H

#include "HalCtype.h"

#define HAL_IO_INVALID 0xff

typedef enum
{
    HAL_IO_OUTPUT,
    HAL_IO_INPUT,
} HalGPIODirect_t;

void HalGPIOPortSetLevel(uint8_t port, uint16_t level);
uint16_t HalGPIOPortGetLevel(uint8_t port);
void HalGPIOPortConfig(uint8_t port, HalGPIODirect_t dir);

void HalGPIOSetLevel(uint8_t io, uint8_t level);
uint8_t HalGPIOGetLevel(uint8_t io);
void HalGPIOConfig(uint8_t io, HalGPIODirect_t dir);
void HalGPIOInitialize(void);
void HalGPIOPoll(void);

#endif
